import java.util.Scanner;

public class Test {
    public static int func(int n) {
        if (n == 1){
            return 1;
        }
        return n*func(n-1);
    }
    public static void main(String[] args) {
        Scanner n = new Scanner(System.in);
        int ret = func(n.nextInt());
        System.out.println(ret);
    }
}
